<?php
/********/
/* videocat */
/********/

define("T_videocat","pms_plug_videocat");

/* selection (liste)*/
$sql['videocat']['select_videocat']="SELECT * FROM ".T_videocat." ORDER BY videocat_date DESC";
$sql['videocat']['select_videocat_nb']="SELECT COUNT(*) AS nb FROM ".T_videocat." ";
$sql['videocat']['select_videocat_condition']="SELECT * FROM ".T_videocat." {condition} {order} {limit}";

/* selection (details) */
$sql['videocat']['select_videocat_details'] = "SELECT * FROM ".T_videocat." WHERE videocat_id='{id}'";

/* insertion */
$sql['videocat']['insert_videocat']="INSERT INTO ".T_videocat." (videocat_name, videocat_description, videocat_status) VALUES ('{name}','{description}', '{status}')";  

# modification
$sql['videocat']['edit_videocat']="UPDATE ".T_videocat." SET videocat_name='{name}' 
                            , videocat_description='{description}'
                            , videocat_status='{status}'
                            WHERE videocat_id='{id}' ";

/* verification */
$sql['videocat']['verif_presence_videocat']="SELECT videocat_id FROM ".T_videocat." WHERE videocat_name='{name}' AND videocat_id!='{id}'";

/* suppression */
$sql['videocat']['sup_videocat']="DELETE FROM ".T_videocat." WHERE videocat_id='{id}'";
?>